﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using DBLibrary;

namespace WPFClient
{
    /// <summary>
    /// Logique d'interaction pour AddAlbum.xaml
    /// </summary>
    public partial class AddAlbum : Window
    {
        private Customer customer;

        public AddAlbum(Customer customer)
        {
            InitializeComponent();
            this.customer = customer;
        }

        private void buttonSave_Click(object sender, RoutedEventArgs e)
        {
            customer.addAlbum(textBoxName.Text);
            ((MainWindow)App.Current.MainWindow).fillComboBox();
            this.Close();
        }

        private void buttonCancel_Click(object sender, RoutedEventArgs e)
        {
            textBoxName.Text = "";
            this.Close();
        }
    }
}
